import {
  Entity,
  Column,
  ManyToMany,
  JoinTable,
  OneToMany,
  ManyToOne,
} from 'typeorm';
import { Base } from './base.entity';
import { ApiProperty } from '@nestjs/swagger';
import { Work } from './work.entity';

@Entity({
  name: 'user_file',
})
export class UserFileEntity extends Base {
  @Column({ length: 500 })
  @ApiProperty({ title: '名称' })
  name: string;

  @ApiProperty({ title: '描述', default: ' ' })
  @Column({ default: '' })
  description: string;

  @Column()
  @ApiProperty({ title: '桶' })
  bucket: string;

  @Column()
  @ApiProperty({ title: '文件名' })
  fileName: string;

  @Column()
  @ApiProperty({ title: '文件类型' })
  fileType: string;

  @Column({nullable: true})
  @ApiProperty({ title: '模板id' })
  templateId: string;

  @Column({ nullable: true })
  @ApiProperty({ title: '任务', nullable: true })
  workId: string;

  @Column({ type: 'text', nullable: true })
  @ApiProperty({ title: '展示示例图片', nullable: true })
  url: string;
  @Column({ type: 'text', nullable: true })
  @ApiProperty({ title: '大图', nullable: true })
  largeUrl: string;
  @Column({ type: 'text', nullable: true })
  @ApiProperty({ title: '中图', nullable: true })
  midUrl: string;
  @Column({ type: 'text', nullable: true })
  @ApiProperty({ title: '小图', nullable: true })
  smallUrl: string;
}
